package com.tangyee.utils;

import android.util.Log;

import com.tangyee.home.activity.db.UsersInfo;

import org.litepal.LitePal;

import java.util.List;

public class UserInfoUtil {
    private static final String TAG = "UserInfoUtil";

    /**
     * 获取登录的信息
     * @return
     */
    public static UsersInfo getLoadedUser(){
        List<UsersInfo> list = LitePal.findAll(UsersInfo.class);
        Log.d(TAG, "getLoadedUser: 数据库用户数为："+list.size());
        for(UsersInfo user:list){
            if(user.getStatus()==1){
                return user;
            }
        }
        return null;
    }

}
